<h3>Receive Purchase Order</h3>

<%= form_for @purchase_order, url: admin_inventory_receiving_path(@purchase_order),
                              html: { class: 'prepend-4' } do |form| %>

  <fieldset id="admin-product-names" class='span-11 fields'>
    <div class='span-15'>
        <div class='span-14'>
          <div class='span-11'>
            Invoice: <%= @purchase_order.invoice_number %>
            --- Tracking #: <%= @purchase_order.display_tracking_number %>
          </div>
          <div style='float:right;'>
            Receive All: <%= form.check_box :receive_po %>
          </div>
        </div>

        <%= form.fields_for :purchase_order_variants,  @purchase_order.purchase_order_variants do |po_variant_form| %>
          <div class='span-14'>
            <%= render partial: 'form', locals: { po_variant_form: po_variant_form } %>
          </div>
        <% end %>
    </div>
  </fieldset>




  <div class=" generic_submit_button">
    <%= submit_tag "Update",
                    class: "button",
                    id:    "create_purchase_order_button" %>
  </div>
<% end %>


<%#= link_to 'Show', admin_inventory_purchase_order_path(@purchase_order) %> |
<%= link_to 'Back', admin_inventory_receivings_path %>


